import fetch from 'utils/fetch';

//查询所有省
export function queryAllProvince() {
    const data = {
    };
   
    return fetch({
        url: '/report/queryAllProvince',
        method: 'post',
        data
    });
}
//查询所有市
export function queryAllCityByProvinceId(provinceId) {
    const data = {
        provinceId
    };
    return fetch({
        url: '/report/queryAllCityByProvinceId',
        method: 'post',
        data
    });
}
//查询所有区
export function queryAllAreaByCityId(cityId) {
    const data = {
        cityId
    };
    return fetch({
        url: '/report/queryAllAreaByCityId',
        method: 'post',
        data
    });
}

// 根据名称模糊查询学校名称
export function querySchoolByName(schoolName,provinceId,cityId,areaId) {  
    const data = {
        schoolName,
        provinceId,
        cityId,
        areaId
    };
    return fetch({
        url: '/report/querySchoolByName',
        method: 'post',
        data
    });
}

// // 根据学校Id查询班级
// export function getClassList(schoolId) {
//     const data = {
//         schoolId
//     };
//     return fetch({
//         url: '/class/getClassName',
//         method: 'post',
//         data
//     });
// }

// 查询科目
export function listSubject() {
    const data = {
    };
    return fetch({
        url:'/report/listSubject',
        method: 'post',
        data
    });
}

// 查询年级
export function listGraduate() {
    const data = {
    };
    return fetch({
        url:'/report/listGraduate',
        method: 'post',
        data
    });
}

// 根据年级和科目查询教材
export function getEdition(subjectId, gradesId) {
    const data = {
        subjectId, // "科目id"（必填）,
        gradesId   // "年级id"（必填）
        
    };
    return fetch({
        url:'/report/getEdition',
        method: 'post',
        data
    });
}